package org.lh.tools;

import com.google.gson.Gson;

/**
 * 作者：idea
 * 日期：2018/7/18
 * 描述：
 */
public class ReturnTypeHandle {
    public static String resultHandle(Object param){
        String result="";
        if(param instanceof java.lang.String){
            System.out.println("thsi is string");
            result= (String) param;
        }else if(param instanceof java.util.List) {
            System.out.println("this is list");
            Gson gson=new Gson();
            return gson.toJson(param);
        }else if(param instanceof java.lang.StringBuffer) {
            result= param.toString();
        }
        return result;
    }
}
